#include<iostream>
#include<cstring>
using namespace std;
int arr1[500];
int arr2[500];
int result[500];
char a[500];
char b[500];
int main()
{
	cin >> a >> b;
	int len1 = strlen(a);
	int len2 = strlen(b);
	int z = 0;
	for (int i = len1 - 1; i >= 0; i--)
	{
		arr1[z] = a[i] - '0';
		z++;
	}
	z = 0;
	for (int i = len2 - 1; i >= 0; i--)
	{
		arr2[z] = b[i] - '0';
		z++;
	}
	z = 0;
	int MAX = max(len1, len2);
	for (int i = 0; i <= MAX; i++)
	{
		result[i] = arr1[i] + arr2[i] + z;
		if (result[i] >= 10) {
			z++;
			result[i] %= 10;
		}
		else
		{
			z = 0;
		}
	}
	int maxIndex = MAX;
	if (result[MAX] == 0)
	{
		maxIndex = MAX - 1;
	}
	for (int i = maxIndex; i >=0 ; i--)
	{
		cout << result[i];
	}
	return 0;
}